/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sharefileinterface;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.LinkedHashMap;
import java.util.Vector;

/**
 *
 * @author anwedo
 */
public interface ShareFileInterface extends Remote {

    public int registFile(String filename, String sender, long size) throws RemoteException;

    public int registDirectory(String dirname, String sender, long size,Vector<FileShared> fileList) throws RemoteException;

    public Vector<StatedFileShare> getFileList(String key) throws RemoteException;

    public int checkJoin(String macAdd, String comName) throws RemoteException;
    
    //new
    public Vector<String> folderContent(int folderID) throws RemoteException;

    public Vector<String> getIPListByFid(int fid) throws RemoteException;

    public int getFileSize(int fid, int k) throws RemoteException;

    public int changeStatusWithMac(String macAdd) throws RemoteException;

    public int changeStatusForIP(String ip) throws RemoteException;
    
    //thong bao cho server co bao nhieu phan file
    public String hasFilePart(String sender, int fid, int part) throws RemoteException;
    
    //Lay ds client giu file FID va phan file tuong ung
    public LinkedHashMap<String, Integer> needFilePart(String sender, int fid) throws RemoteException;
    
    //Cap nhat trng thai client
    public String updateStatus(String sender, String status) throws RemoteException;
    
}
